<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editorr.
 */
namespace Agp\CoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use MrPrompt\Cielo\Resposta\TransacaoResponse;

/**
 *
 * @author bondcs
 * @ORM\Table(name="retorno_3ds_cielo")
 * @ORM\Entity()
 */
class Retorno3dsCielo { 
    
    /**
     * @var integer $codRetorno3dsCielo
     *
     * @ORM\Column(name="cod_retorno_3ds_cielo", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     *
     */
    protected $codRetorno3dsCielo;
    
    /**
     * Tid
     * 
     * @var string
     * @ORM\Column(name="tid", type="string", length=255, nullable=true)
     */
    protected $tid;
    
    /**
     * Número do pedido
     * 
     * @var string
     * @ORM\Column(name="num_pedido", type="string", length=255, nullable=true)
     */
    protected $numPedido;
    
    /**
     * Data 
     * 
     * @var string
     * @ORM\Column(name="data", type="datetime", nullable=true)
     */
    protected $data;
    
    /** @var string
     * 
     * @ORM\Column(name="nm_parcela", type="string", length=42, nullable=true)
     */
    protected $nmParcela;
    
    /**
     * Raw resposta
     * 
     * @var string
     * @ORM\Column(name="raw_response", type="text", nullable=true)
     */
    protected $rawResponse;
    
    /**
     * Pan
     * 
     * @var string
     * @ORM\Column(name="pan", type="string", length=80, nullable=true)
     */
    protected $pan;
    
    /**
     * Status
     * 
     * @var string
     * @ORM\Column(name="status", type="string", length=80, nullable=true)
     */
    protected $status;
    
    /**
     * 
     * @var string
     * @ORM\Column(name="valor", type="string", length=80, nullable=true)
     */
    protected $valor;
    
    /**
     * 
     * @var string
     * @ORM\Column(name="url_autenticacao", type="string", length=255, nullable=true)
     */
    protected $urlAutenticacao;
    
    public function __construct(TransacaoResponse $resposta) {
        $this->data = $resposta->getData();
        $this->nmParcela = $resposta->getNmParcela();
        $this->numPedido = $resposta->getNmPedido();
        $this->pan = $resposta->getPan();
        $this->rawResponse = $resposta->getRawResponse()->asXml();
        $this->status = $resposta->getStatus();
        $this->tid = $resposta->getTid();
        $this->valor = $resposta->getValor();
        $this->urlAutenticacao = $resposta->getUrlAutenticacao();
    }
    
    public function getCodRetorno3dsCielo() {
        return $this->codRetorno3dsCielo;
    }

    public function getTid() {
        return $this->tid;
    }

    public function getNumPedido() {
        return $this->numPedido;
    }

    public function getData() {
        return $this->data;
    }

    public function getNmParcela() {
        return $this->nmParcela;
    }

    public function getRawResponse() {
        return $this->rawResponse;
    }

    public function getPan() {
        return $this->pan;
    }

    public function getStatus() {
        return $this->status;
    }

    public function getValor() {
        return $this->valor;
    }

    public function getUrlAutenticacao() {
        return $this->urlAutenticacao;
    }

    public function setCodRetorno3dsCielo($codRetorno3dsCielo) {
        $this->codRetorno3dsCielo = $codRetorno3dsCielo;
    }

    public function setTid($tid) {
        $this->tid = $tid;
    }

    public function setNumPedido($numPedido) {
        $this->numPedido = $numPedido;
    }

    public function setData($data) {
        $this->data = $data;
    }

    public function setNmParcela($nmParcela) {
        $this->nmParcela = $nmParcela;
    }

    public function setRawResponse($rawResponse) {
        $this->rawResponse = $rawResponse;
    }

    public function setPan($pan) {
        $this->pan = $pan;
    }

    public function setStatus($status) {
        $this->status = $status;
    }

    public function setValor($valor) {
        $this->valor = $valor;
    }

    public function setUrlAutenticacao($urlAutenticacao) {
        $this->urlAutenticacao = $urlAutenticacao;
    }


}

?>
